﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;
using Lamex.Interface;
using Lamex.Library.CommonClass;

namespace Lamex.mMaterial.UI
{
    public partial class frmMC_Main : frmModuleBase
    {
        public frmMC_Main()
        {
            InitializeComponent();
            menuStrip1.Text = ModuleNames.mMaterial; //与AssemblyModuleEntry.ModuleName定义相同

        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }

        private void menuMC_MO_BOM_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmMC_MO_BOM), sender as ToolStripMenuItem);
        }

        private void menuMC_Material_Owed_Record_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("MC_Material_Owed_Record", 0, false, true), sender as ToolStripMenuItem);
        }

        private void menuMC_Raw_Material_Inventory_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("WH_Raw_Material_Inventory", 0, true, false), sender as ToolStripMenuItem);
        }
        private void menuMC_Raw_Material_Photo_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmMC_Raw_Material_Photo), sender as ToolStripMenuItem);
        }

        private void menuMC_Raw_Material_Label_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmMC_Raw_Material_Photo), sender as ToolStripMenuItem);
        }

        private void menuMC_WH_CBM_Maintenance_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("WH_CBM_WT_Revised", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuMC_WH_Weight_By_Length_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("WH_Mat_Unit_Weight_Per_Meter", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuMC_WH_Weight_By_Square_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("WH_Mat_Unit_Weight_Per_Square", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuMC_WH_Mat_Drawing_Compatable_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("WH_Mat_Drawing_Compatable", 0, true, true), sender as ToolStripMenuItem);
        }
    }
}